<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>Code Snippet - &quot;<s:property value="subjectField" />&quot;</title>
  <link rel="stylesheet" href="../default.css" />
</head>
<body>
    <div id="main">
      <div id="content">
        <div id="login">
          <div id="login-left">Welcome <s:property value="userName" /></div>
          <div id="login-right"><a href="<s:property value='logoutUrl' />">Logout</a></div>
        </div>
        <div id="block">
          <h1>Code Snippet Repository</h1>
          <h3>View Code Snippet - <s:property value="subjectField" /></h3>
        </div>
        <div id="strip">
          <a href="/index.action">Home</a>
          <s:property value="additionalLinks" escape="false"/>
        </div>
        <div id="block">
          <div id="codesnippet-block"></div>
          <s:if test="retrievedCodeSnippetsListEmpty">
            <div id="codesnippet-block">
              There is no code snippet available...
            </div>
          </s:if>
          <s:else>
            <div id="codesnippet-block">
              <div id="codesnippet-subblock1">
                <b>Date</b>
              </div>
              <div id="codesnippet-subblock2">
                <b>Subject</b>
              </div>
              <div id="codesnippet-subblock3">
                <b>Author</b>
              </div>	  	      
            </div>
	  	    <s:iterator value="retrievedCodeSnippets">
              <div id="codesnippet-block">
                <div id="codesnippet-subblock1">
                  <s:property value="submissionTime"/>
                </div>
                <div id="codesnippet-subblock2">
                  <a href="<s:property value='codeSnippetUrl'/>"><s:property value="subject"/></a>
                </div>
                <div id="codesnippet-subblock3">
                  <s:property value="author"/>
                </div>	  	      
              </div>
            </s:iterator>
          </s:else>
          <div id="codesnippet-block"></div>
        </div>
        <div id="strip"></div>
      </div>
    </div>
    <br/>
    <br/>
</body>
</html>